@import '/variable.less';

.ocr-container {
  min-height: 100vh;
  background: #FAF8F3;
  padding-bottom: 100px;
}

/* 顶部导航 */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FAF8F3;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);

  .nav-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;

    &:active {
      background: rgba(0, 0, 0, 0.05);
    }
  }

  .nav-title {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
  }

  .nav-placeholder {
    width: 36px;
  }
}

/* 图片预览区域 */
.image-section {
  margin: 20px;
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

  .preview-image {
    width: 100%;
    height: 300px;
    background: #F5F5F5;
  }

  .image-actions {
    padding: 16px;
    display: flex;
    justify-content: center;

    .action-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 16px;
      border-radius: 20px;
      background: #FFF3E0;
      border: 1px solid #FFB347;
      transition: all 0.3s ease;

      &:active {
        background: #FFB347;
        color: #FFFFFF;
      }

      text {
        font-size: 14px;
        color: #FFB347;
      }
    }
  }
}

/* 操作按钮区域 */
.action-section {
  margin: 40px 20px;
  text-align: center;

  .action-title {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 24px;
  }

  .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;

    .action-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 20px;
      border-radius: 12px;
      font-size: 16px;
      font-weight: 500;
      transition: all 0.3s ease;

      &:active {
        transform: scale(0.98);
      }

      &.primary {
        background: #FFB347;
        color: #FFFFFF;
        box-shadow: 0 4px 12px rgba(255, 179, 71, 0.3);
      }

      &.secondary {
        background: #FFFFFF;
        color: #FFB347;
        border: 2px solid #FFB347;
      }
    }
  }
}

/* 识别结果区域 */
.result-section {
  margin: 20px;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

  .result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;

    .result-title {
      font-size: 16px;
      font-weight: 600;
      color: #333333;
    }

    .result-actions {
      .action-btn {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 6px 12px;
        border-radius: 6px;
        background: #FFF3E0;
        transition: all 0.3s ease;

        &:active {
          background: #FFE0B2;
        }

        text {
          font-size: 12px;
          color: #FFB347;
        }
      }
    }
  }

  .result-content {
    .result-textarea {
      width: 100%;
      min-height: 120px;
      padding: 12px;
      border: 1px solid #E0E0E0;
      border-radius: 8px;
      font-size: 14px;
      line-height: 1.6;
      color: #333333;
      background: #FAFAFA;
      resize: none;

      &:focus {
        border-color: #FFB347;
        background: #FFFFFF;
      }
    }
  }

  .result-footer {
    margin-top: 12px;
    text-align: right;

    .confidence {
      font-size: 12px;
      color: #888888;
    }
  }
}

/* 加载状态 */
.loading-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

/* 底部操作按钮 */
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  padding: 16px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;

  .publish-btn {
    width: 100%;
    background: #FFB347;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(255, 179, 71, 0.3);
    transition: all 0.3s ease;

    &:active {
      transform: scale(0.98);
    }
  }
}
